class Culture < ActiveRecord::Base
  has_many    :kingdoms
  has_many    :characters
  
  def generate_christian_name(sex)
    raise "No Christian names defined for #{self.name}" unless self.christian_names
    names = self.christian_names.split ','
    return names[rand(names.size)].split('-')[sex == "male" ? 0 : 1].strip
  end
  
  def generate_family_name
    raise "No Family names defined for #{self.name}" unless self.family_names
    names = self.family_names.split ','
    return names[rand(names.size)].strip
  end
end
